package com.igeek.test;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import lombok.extern.slf4j.Slf4j;

import java.util.Map;

/**
 * @Author zengxiangjun
 * @Date 2022/8/5  20:23 MyAnalysisEventListener
 */

@Slf4j
public class MyAnalysisEventListener extends AnalysisEventListener<User> {

    //一行行读取Excel中的数据  从第二行读取数据
    @Override
    public void invoke(User user, AnalysisContext analysisContext) {
        log.info("user {}", user);
    }

    //读取表头信息
    @Override
    public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
        log.info("headMap {}", headMap);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }
}
